<?php
/*
  $Id$

  osCommerce, Open Source E-Commerce Solutions
  http://www.oscommerce.com

  Copyright (c) 2010 osCommerce

  Released under the GNU General Public License
*/

  if ($messageStack->size('header') > 0) {
    echo '<div class="grid_24">' . $messageStack->output('header') . '</div>';
  }
?>
<div id="loginDiv"></div>


<header>
  <h1><?php echo '<a href="' . tep_href_link(FILENAME_DEFAULT) . '">' . tep_image(DIR_WS_IMAGES . 'store_logo.png', STORE_NAME) . '</a>'; ?></h1>

    <div id="welcomeMessage"><?php echo tep_customer_greeting(); ?></div>



    <ul>
        <li id="cartContents"><a href="<?php echo (tep_href_link(FILENAME_SHOPPING_CART, '', 'SSL')) ?>"><span>Cart Contents</span><?php echo ($cart->count_contents() > 0 ? ' (' . $cart->count_contents() . ')' : '') ;?></a></li>
        <li id="checkout"><a href="<?php echo (tep_href_link(FILENAME_CHECKOUT_SHIPPING, '', 'SSL')) ;?>"><span>Checkout</span></a></li>
        <li id="myAccount"><a href="<?php echo (tep_href_link(FILENAME_ACCOUNT, '', 'SSL'));?>"><span>My Account</span></a></li>
        <?php

        if (tep_session_is_registered('customer_id')) {
            echo ('<li id="logoff"><a href="'.tep_href_link(FILENAME_LOGOFF, '', 'SSL').'"><span>Log Off</span></a></li>');
        } else {
            echo ('<li id="signIn"><a href="login.php"><span>Sign In</span></a></li>');

        }
        ?>
    </ul>
</header>

<div id="breadCrumbs">
  <ul id="breadcrumb"><?php echo  $breadcrumb->trail('');    /* breadcrumb.php  */ ?></ul>
</div>
<?php
  if (isset($HTTP_GET_VARS['error_message']) && tep_not_null($HTTP_GET_VARS['error_message'])) {
?>
<table border="0" width="100%" cellspacing="0" cellpadding="2">
  <tr class="headerError">
    <td class="headerError"><?php echo htmlspecialchars(stripslashes(urldecode($HTTP_GET_VARS['error_message']))); ?></td>
  </tr>
</table>
<?php
  }

  if (isset($HTTP_GET_VARS['info_message']) && tep_not_null($HTTP_GET_VARS['info_message'])) {
?>
<table border="0" width="100%" cellspacing="0" cellpadding="2">
  <tr class="headerInfo">
    <td class="headerInfo"><?php echo htmlspecialchars(stripslashes(urldecode($HTTP_GET_VARS['info_message']))); ?></td>
  </tr>
</table>
<?php
  }
?>